package main

import (
	"fmt"
	"strconv"
	"time"
)

func main() {
	// 原则：主死从随
	go test()

	for i := 0; i < 10; i++ {
		fmt.Println("hello main " + strconv.Itoa(i))
		time.Sleep(time.Second)
	}
}

func test()  {
	for i := 0; i < 10; i++ {
		fmt.Println("hello test " + strconv.Itoa(i))
		time.Sleep(time.Second * 2)
	}
}